package com.woniu.service;

import com.woniu.entity.Course;
import com.woniu.entity.Order;
import com.woniu.entity.PageResult;
import com.woniu.entity.dto.OrderDTO;

import java.util.List;
import java.util.Map;

public interface OrderService {
    PageResult<Order> getOrdersByPage(String orderMethod, Integer status,Integer userId, String username, Integer pageNum, Integer pageSize);

    void addsc(Integer userId, Integer courseId);

    Integer selectUidByCid(Integer userId, Integer courseId);

    void delectsc(Integer userId, Integer courseId);

    void updateRemark(String orderId, String remark);

    Order getOrderById(String orderId);

    /**
     * 创建多个订单（属于同一个总订单）
     * @param orders 订单数组
     * @return 总订单编号
     */
    public String createOrders(List<Order> orders) ;


    List<Map<String, Object>> getPaymentRankings();

    Integer selectUC(Integer userId, Integer courseId);

    List<Course> selectOrder(Integer userId);

  List<Course> getCoursesByOrderId(String orderId);

    Map<String, Object> getCourseDetailWithUser(Long courseId);

    void deleteOrder(String orderId);
    void deleteOrderAndCourse(String orderId);
}
